﻿<phone:PhoneApplicationPage 
    x:Class="myChannel9.Show"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    Loaded="PhoneApplicationPage_Loaded">

    <UserControl.Resources>
        <Style x:Key="PanoramaTextBlock" TargetType="TextBlock">
            <Setter Property="Foreground" Value="#FF404040"/>
            <Setter Property="FontSize" Value="30"/>
        </Style>

        <Style x:Key="PanoramaTextListBox" TargetType="ListBox">
            <Setter Property="ItemContainerStyle">
                <Setter.Value>
                    <Style TargetType="ListBoxItem">
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate TargetType="ListBoxItem">
                                    <TextBlock Text="{Binding Name}"
                                               Style="{StaticResource PanoramaTextBlock}"/>
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" Background="#FF54A2A4">
        <Image Source="Images/bg.png" Height="800" Width="500" VerticalAlignment="Top" HorizontalAlignment="Left" />
        <!--<Image Source="Images/appbar_back.png" x:Name="btnBack" Width="48" Height="48" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="15" MouseLeftButtonDown="btnBack_MouseLeftButtonDown" />-->

        <Grid Margin="20,15,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" >
            <Grid Background="White" Opacity="0.6" Width="180" Height="180" />
            <StackPanel Orientation="Vertical">
                <Image x:Name="imgIcon" Width="160" Margin="0,0,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" />
                <TextBlock x:Name="lblName" Foreground="#FF404040" Margin="0,10,0,0" FontSize="30" Style="{StaticResource PanoramaTextBlock}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
            </StackPanel>
        </Grid>

        <Image x:Name="btnRefresh" Visibility="Visible" Source="Images/appbar_refresh.png" HorizontalAlignment="Right" VerticalAlignment="Top" Width="48" Height="48" Margin="0,15,19,0" MouseLeftButtonDown="btnRefresh_MouseLeftButtonDown" />

        <ListBox x:Name="lboShow" Width="450" Margin="20,220,20,0" VerticalAlignment="Top" HorizontalAlignment="Left" SelectionChanged="lboShow_SelectionChanged" >
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <!--<Grid>
                        <Border Background="White" Margin="0,0,0,30" Width="450" Opacity="0.5" />
                        <StackPanel Orientation="Vertical">
                            <TextBlock Text="{ Binding getPostedDetails}" TextWrapping="Wrap" Margin="20,0,25,0" Style="{StaticResource PanoramaTextBlock}" />
                            <TextBlock Text="{ Binding getLenght}" TextWrapping="Wrap" Margin="20,0,25,25" Style="{StaticResource PanoramaTextBlock}" />
                            <TextBlock Text="{ Binding Heading}" TextWrapping="Wrap" Margin="20,0,25,40" Style="{StaticResource PanoramaTextBlock}" />

                        </StackPanel>
                    </Grid>-->
                    <Grid>
                        <Border Background="White" Margin="0,0,0,30" Width="450" Opacity="0.5" />
                        <StackPanel Orientation="Vertical">
                            <StackPanel Orientation="Horizontal" Margin="0,0,20,0">
                                <Image Source="{ Binding getImage }" Width="200" Margin="0,0,10,10" VerticalAlignment="Top" HorizontalAlignment="Left" />
                                <StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center" >
                                    <TextBlock Text="{ Binding getPostedDetails}" FontSize="26" Margin="5,0,0,0" TextWrapping="Wrap" Style="{StaticResource PanoramaTextBlock}" />
                                    <TextBlock Text="{ Binding getLenght}" FontSize="26" Margin="5,0,0,0" TextWrapping="Wrap" Style="{StaticResource PanoramaTextBlock}" />
                                </StackPanel>
                            </StackPanel>
                            <TextBlock Text="{ Binding Heading}" TextWrapping="Wrap" Margin="20,0,25,40" Style="{StaticResource PanoramaTextBlock}" />
                        </StackPanel>
                    </Grid>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>

        <TextBlock x:Name="lblLoading" Text="loading..." Foreground="White" FontSize="30" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,0,0,0" />
    </Grid>
</phone:PhoneApplicationPage>
